package com.cheng.service;

import com.cheng.common.exception.CommonException;
import com.cheng.data.entity.RoleInfoEntity;
import com.cheng.data.entity.RolePermEntity;

import java.util.List;

/**
 * @author: ChengJW
 * @date: 2021/11/17 7:16
 * @version: 1.0
 * @description: 角色-权限表操作
 */
public interface RolePermService {


    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/17
    * @description: 新增角色-权限信息
    */
    int insertRolePerm(RolePermEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [list]
    * @return: int
    * @date: 2021/11/17
    * @description: 批量插入角色-权限信息
    */
    int insertBatchRolePerm(List<RolePermEntity> list) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/17
    * @description: 修改角色-权限信息
    */
    int updateRolePerm(RolePermEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [list]
    * @return: int
    * @date: 2021/11/18
    * @description: 批量修改角色-权限信息
    */
    int updateBatchRolePerm(List<RolePermEntity> list) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/17
    * @description: 删除角色-权限信息
    */
    int deleteRolePerm(RolePermEntity entity) throws CommonException;

    /**
    * @author: ChengJW
    * @params: [entity]
    * @return: int
    * @date: 2021/11/18
    * @description: 根据角色 ID 批量删除 角色-权限表
    */
    int deleteBatchRolePerm(RolePermEntity entity) throws CommonException;
}
